cmake_minimum_required(VERSION 3.4)

project(DEMOS)

add_executable(cube
    cube.c
    gettime.h
    linmath.h
    lunarg.ppm.h
    object_type_string_helper.h
    )

target_compile_definitions(cube PUBLIC
    VK_USE_PLATFORM_WIN32_KHR
    VK_PROTOTYPES
    _CRT_SECURE_NO_WARNINGS
    _USE_MATH_DEFINES
    )

target_include_directories(cube PUBLIC
    $ENV{VULKAN_SDK}/Include
    ${CMAKE_CURRENT_SOURCE_DIR}
    )

target_link_libraries(cube
    $ENV{VULKAN_SDK}/$<IF:$<EQUAL:${CMAKE_SIZEOF_VOID_P},4>,Lib32,Lib>/vulkan-1.lib
    )

add_executable(cube_cpp
    cube.cpp
    gettime.h
    lunarg.ppm.h
    object_type_string_helper.h
    )

target_compile_definitions(cube_cpp PUBLIC
    VK_USE_PLATFORM_WIN32_KHR
    VK_PROTOTYPES
    _CRT_SECURE_NO_WARNINGS
    _USE_MATH_DEFINES
    )

set_target_properties(cube_cpp PROPERTIES
    LINK_FLAGS /SUBSYSTEM:WINDOWS
    )

target_include_directories(cube_cpp PUBLIC
    $ENV{VULKAN_SDK}/Include
    ${CMAKE_CURRENT_SOURCE_DIR}
    ${CMAKE_CURRENT_SOURCE_DIR}/external/glm
    )

target_link_libraries(cube_cpp
    $ENV{VULKAN_SDK}/$<IF:$<EQUAL:${CMAKE_SIZEOF_VOID_P},4>,Lib32,Lib>/vulkan-1.lib
    )
